<%--
 @Author:princess
 @Date 2023/12/4 12 04 19:11
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<html>
<head>
    <title>register</title>
</head>
<body>
    <%-- 不使用SpringMVC 表单标签库 --%>
<%--    <form action="userRegister" method="post">--%>
<%--        <spring:message code="txt.username"></spring:message>：--%>
<%--        <input type="text" name="username">--%>
<%--        <span style="color: red">${errors.username}</span>--%>
<%--        <br>--%>
<%--        <spring:message code="txt.password"></spring:message>：--%>
<%--        <input type="password" name="password">--%>
<%--        <span style="color: red">${errors.password}</span>--%>
<%--        <br>--%>
<%--        <input type="submit" value="<spring:message code="txt.register"></spring:message>">--%>
<%--    </form>--%>

    <form:form method="post" action="userRegister" modelAttribute="user">

        <form:label path="username">
            <spring:message code="txt.username"></spring:message>
        </form:label>
        <form:input path="username" id="username"></form:input>
        <form:errors path="username" cssStyle="color: red"></form:errors>
        <br>

        <form:label path="password">
            <spring:message code="txt.password"></spring:message>：
        </form:label>
        <form:input path="password" id="password"></form:input>
        <form:errors path="password" cssStyle="color: red"></form:errors>
        <br>

        <input type="submit" value="<spring:message code="txt.register"></spring:message>">
    </form:form>

</body>
</html>